<?php
	class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
		public function _initDoctype(){
			$this->bootstrap('layout');
			$layout = $this->getResource('layout');
			$view = $layout->getView();
			$doctypeHelper = new Zend_View_Helper_Doctype();
			$doctypeHelper->doctype('XHTML1_STRICT');
		}		
		
 		public function _initAutoload()
		{
			//Zend_Controller_Action_HelperBroker::addPrefix('HelloCMS_Controller_Action_Helper');
			//Zend_Controller_View_HelperBroker::addPrefix('HelloWeb_Controller_View_Helper');
			$modules = array(
					'Admin',
					'Site',
					'Page'
			);
			
			foreach ($modules as $module) {
				switch($module){
					case "Page":
						$autoloader = new Zend_Application_Module_Autoloader(array(
								'namespace' => 'Application' ,
								'basePath' => APPLICATION_PATH . '/modules/mod_page/' ));
						break;
					default:
						$autoloader = new Zend_Application_Module_Autoloader(array(
								'namespace' => 'Application' ,
								'basePath' => dirname(__FILE__)));
				}

			}
			return $autoloader; 
		}

		protected function _initViewHelper(){
// 			$this->bootstrap('layout');
// 			$layout = $this->getResource('layout');
// 			$view = $layout->getView();
// 			//$view->headLink()->setStylesheet('/bluestork/css/system.css');
// 			$doctypeHelper = new Zend_View_Helper_Doctype();
// 			$doctypeHelper->doctype('XHTML1_STRICT');
		}		
		
		public function _initView(){
/* 			$view = new Zend_View();
			$view->addHelperPath('../library/HelloWeb/View/Helper','HelloWeb_View_Helper_');
			$viewRenderer =  new Zend_Controller_Action_Helper_viewRenderer();
			Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
			$viewRenderer->setView($view);
			return $view; */
		}
		/*
		protected function _initDoctype()
		{
			$this->bootstrap('view');
			$view = $this->getResource('view');
			$view->doctype('XHTML1_STRICT');
		}*/	 	
	}
